﻿using System;
using System.Collections.Generic;

namespace Test
{
    internal interface IDataProcessing
    {
        /// <summary>
        /// 获取变更的信息
        /// </summary>
        /// <returns></returns>
        DataProcessing DataProcessingList();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <param name="isfailed">是否失败</param>
        /// <param name="mremarks">失败原因</param>
        void SycnDataProcessingResult(DataProcessingInfoModel model, bool isfailed = false, string mremarks = "");

        /// <summary>
        /// 是否结果通知
        /// </summary>
        bool IsDataProcessingResultBack { get; set; }

        /// <summary>
        /// /// <summary>
        /// 处理结果反馈
        /// </summary>
        /// </summary>
        /// <param name="successCount">成功条数</param>
        /// <param name="failCount">失败条数</param>
        void DataProcessingResultBack(int successCount, int failCount);
    }

    [Serializable]
    public class DataProcessing
    {
        /// <summary>
        /// 
        /// </summary>
        public int TotalCount { get; set; }

        public List<DataProcessingInfoModel> DataProcessingList { get; set; }
    }

    /// <summary>
    /// 获取变更数据
    /// </summary>
    public class DataProcessingInfoModel
    {
        /// <summary>
        /// 业务单号
        /// </summary>
        public string BillNo { get; set; }

        /// <summary>
        /// 变更编号
        /// </summary>
        public string ProjCode { get; set; }

        /// <summary>
        /// 项目变更类型
        /// </summary>
        ///<see cref="ChangeType"/>
        public string ChangesType { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        /// ///<see cref="StatusType"/>
        public string Status { get; set; }

    }


    public class ProjInfoChangesType
    {
        /// <summary>
        /// 变更单位
        /// </summary>
        public const string DeptCode = "2";

        /// <summary>
        /// 项目负责人
        /// </summary>
        public const string ChangesPerson = "1";


        public static readonly Dictionary<string, string> Names = new Dictionary<string, string>()
        {
            {DeptCode, "变更单位"},
            {ChangesPerson, "负责人变更"}
        };
    }



    public class StatusType
    {
        /// <summary>
        /// 待处理
        /// </summary>
        public const string W = "W";

        /// <summary>
        /// 处理成功
        /// </summary>
        public const string S = "S";

        /// <summary>
        /// 处理失败
        /// </summary>
        public const string F = "F";

        public static readonly Dictionary<string, string> Names = new Dictionary<string, string>()
        {
            {W, "待处理"},
            {S, "处理成功"},
            {F, "处理失败"}
        };


    }
}